Skip to content

Add greeting intent support for Arabic and English#4

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-new-feature
Draft

Add greeting intent support for Arabic and English#4
Copilot wants to merge 3 commits intomainfrom
copilot/add-new-feature

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 21, 2025

The platform lacked basic social interaction handling. Users greeting the agent (e.g., "اهلا", "hello") received generic unknown intent responses.

Changes

Core Intent System

  • Added GREETING intent type to IntentType enum
  • Extended keyword matching: Arabic (اهلا, مرحبا, السلام عليكم, صباح الخير, etc.) and English (hello, hi, hey, good morning, etc.)
  • Added bilingual greeting responses via generate_response()

Intelligence Core Integration

  • Updated _select_tools() to handle greeting intent (requires no tools)
  • Added greeting execution plan with single-step response generation
  • Fixed English response handling to use IntentType.GREETING.value for consistency

Testing

  • Added test_detect_greeting_arabic() and test_detect_greeting_english() covering common greeting phrases

Example

core = IntelligenceCore()
result = await core.process_request("اهلا")
# Returns: "أهلاً وسهلاً! أنا وكيل ذكي جاهز لمساعدتك. كيف يمكنني خدمتك اليوم؟"
# Intent: greeting, Tools: []

result = await core.process_request("hello")  
# Returns: "Hello! I'm an intelligent AI agent ready to assist you. How can I help you today?"

Greeting detection occurs in detect_intent() before other intent patterns, ensuring greetings are recognized regardless of additional context in the message.

Original prompt

اهلا

Created from VS Code via the GitHub Pull Request extension.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 21, 2025 13:07
Co-authored-by: wasalstor-web <230709381+wasalstor-web@users.noreply.github.com>
Co-authored-by: wasalstor-web <230709381+wasalstor-web@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new feature to improve user experience Add greeting intent support for Arabic and English Nov 21, 2025
Copilot AI requested a review from wasalstor-web November 21, 2025 13:11
@wasalstor-web
Copy link
Copy Markdown
Owner

اهلاً

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants